package com.atguigu.spzx.manager.service.impl;

import com.atguigu.spzx.manager.mapper.SysArticleMapper;
import com.atguigu.spzx.manager.service.ArticleCateService;
import com.atguigu.spzx.model.dto.system.SysArticle;
import com.atguigu.spzx.model.vo.article.ArticleCate;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class articleCateServiceImpl  implements ArticleCateService {

    @Autowired
    private  SysArticleMapper sysArticleMapper;



    @Override
    public PageInfo<ArticleCate> findByPage(SysArticle sysArticle, Integer current, Integer limit) {
        PageHelper.startPage(current,limit);
        List<ArticleCate> list=sysArticleMapper.findByPage(sysArticle);
        PageInfo<ArticleCate> pageInfo=new PageInfo<>(list);
        return  pageInfo;
    }
}
